package com.anjubao.parking.municipal.parkinglot.mapper;

import com.anjubao.parking.municipal.parkinglot.dto.ParkingLotDeviceStatusDto;
import com.anjubao.parking.municipal.parkinglot.dto.ParkingLotMonitorGuidanceResDto;
import com.anjubao.parking.municipal.parkinglot.dto.ParkingLotMonitorResDto;
import com.anjubao.parking.municipal.parkinglot.model.ParkingLotDeviceStatus;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 设备状态表mapper
 *
 * @author zhuchunfeng
 */
@Mapper
public interface ParkingLotDeviceStatusMapper extends BaseMapper<ParkingLotDeviceStatus> {

    /**
     * 故障设备列表
     * @param size 大小
     * @param cityId 城市ID
     * @param lowBatteryThreshold 低电量定义
     * @return 故障列表
     */
    List<ParkingLotDeviceStatusDto> queryFailureDevice(Integer size, Integer cityId, Integer lowBatteryThreshold);



    /**
     * 统计设备运行状况
     * @param cityId
     * @return
     */
    List<ParkingLotMonitorResDto> selectDevices(Integer cityId);

    /**
     * 统计诱导屏运行状况
     * @param cityId
     * @return
     */
    List<ParkingLotMonitorGuidanceResDto> selectGuidanceScreen(Integer cityId);

    void updateStatus(@Param("onlineStatus") String onlineStatus,@Param("videoPileCode")String videoPileCode);
}